package com.jufa_3.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@JsonIgnoreProperties({"nickname","city","unionId","delSign","source"})
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String openId;

    private String identity;

    private String nickname;

    private String city;

    private String mobile;

    private String unionId;

    private LocalDateTime createdTime;

    private LocalDateTime updatedTime;

    private String delSign;

    private String source;

    @TableField(exist = false)
    private String token;

    public User(String openId, String identity, String mobile, LocalDateTime createdTime, LocalDateTime updatedTime,  String source) {
        this.openId = openId;
        this.identity = identity;
        this.mobile = mobile;
        this.createdTime = createdTime;
        this.updatedTime = updatedTime;
        this.source = source;
    }

    public User() {
    }

}
